<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>码云 Pages 示例网站</title>
    <!-- 引入 Tailwind CSS 用于样式设计 -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- 引入 Font Awesome 用于图标 -->
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- 自定义 Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#c7254e',
                        secondary: '#3299bb',
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>
    
    <!-- 自定义工具类 -->
    <style type="text/tailwindcss">
        @layer utilities {
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .transition-custom {
                transition: all 0.3s ease;
            }
        }
    </style>
</head>
<body class="bg-gray-50 font-sans text-gray-800">
    <!-- 导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-custom">
        <div class="container mx-auto px-4 py-4 flex justify-between items-center">
            <div class="flex items-center space-x-2">
                <i class="fa fa-code text-primary text-2xl"></i>
                <h1 class="text-xl font-bold">Gitee Pages 示例</h1>
            </div>
            
            <!-- 桌面导航 -->
            <nav class="hidden md:flex space-x-6">
                <a href="#home" class="hover:text-primary transition-custom">首页</a>
                <a href="#features" class="hover:text-primary transition-custom">特性</a>
                <a href="#about" class="hover:text-primary transition-custom">关于</a>
                <a href="#contact" class="hover:text-primary transition-custom">联系</a>
            </nav>
            
            <!-- 移动端菜单按钮 -->
            <button id="menuBtn" class="md:hidden text-gray-600 hover:text-primary transition-custom">
                <i class="fa fa-bars text-xl"></i>
            </button>
        </div>
        
        <!-- 移动端导航菜单 -->
        <div id="mobileMenu" class="md:hidden hidden bg-white border-t">
            <div class="container mx-auto px-4 py-2 flex flex-col space-y-3">
                <a href="#home" class="py-2 hover:text-primary transition-custom">首页</a>
                <a href="#features" class="py-2 hover:text-primary transition-custom">特性</a>
                <a href="#about" class="py-2 hover:text-primary transition-custom">关于</a>
                <a href="#contact" class="py-2 hover:text-primary transition-custom">联系</a>
            </div>
        </div>
    </header>

    <main>
        <!-- 英雄区域 -->
        <section id="home" class="bg-gradient-to-r from-primary to-secondary text-white py-20">
            <div class="container mx-auto px-4 text-center">
                <h2 class="text-[clamp(2rem,5vw,3.5rem)] font-bold mb-6 text-shadow">码云 Pages 示例网站</h2>
                <p class="text-[clamp(1rem,2vw,1.25rem)] max-w-2xl mx-auto mb-8 opacity-90">
                    这是一个可以直接部署到码云 Pages 的静态网站示例，包含响应式设计和基本交互功能。
                </p>
                <a href="#features" class="inline-block bg-white text-primary font-semibold px-6 py-3 rounded-lg shadow-lg hover:shadow-xl transform hover:-translate-y-1 transition-custom">
                    了解更多 <i class="fa fa-arrow-down ml-2"></i>
                </a>
            </div>
        </section>

        <!-- 特性区域 -->
        <section id="features" class="py-16 bg-white">
            <div class="container mx-auto px-4">
                <h2 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold text-center mb-12">网站特性</h2>
                
                <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
                    <!-- 特性卡片 1 -->
                    <div class="bg-gray-50 rounded-lg shadow p-6 hover:shadow-md transition-custom">
                        <div class="w-14 h-14 bg-primary/10 rounded-full flex items-center justify-center mb-4">
                            <i class="fa fa-mobile text-2xl text-primary"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3">响应式设计</h3>
                        <p class="text-gray-600">适配各种屏幕尺寸，从手机到桌面设备都有良好的显示效果。</p>
                    </div>
                    
                    <!-- 特性卡片 2 -->
                    <div class="bg-gray-50 rounded-lg shadow p-6 hover:shadow-md transition-custom">
                        <div class="w-14 h-14 bg-primary/10 rounded-full flex items-center justify-center mb-4">
                            <i class="fa fa-paint-brush text-2xl text-primary"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3">现代样式</h3>
                        <p class="text-gray-600">使用 Tailwind CSS 构建的现代、美观的用户界面。</p>
                    </div>
                    
                    <!-- 特性卡片 3 -->
                    <div class="bg-gray-50 rounded-lg shadow p-6 hover:shadow-md transition-custom">
                        <div class="w-14 h-14 bg-primary/10 rounded-full flex items-center justify-center mb-4">
                            <i class="fa fa-code-fork text-2xl text-primary"></i>
                        </div>
                        <h3 class="text-xl font-semibold mb-3">易于部署</h3>
                        <p class="text-gray-600">可以直接部署到码云 Pages，无需额外配置。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- 关于区域 -->
        <section id="about" class="py-16 bg-gray-50">
            <div class="container mx-auto px-4">
                <div class="flex flex-col md:flex-row items-center gap-10">
                    <div class="md:w-1/2">
                        <img src="https://picsum.photos/600/400" alt="网站开发示意图" class="rounded-lg shadow-lg w-full h-auto">
                    </div>
                    
                    <div class="md:w-1/2">
                        <h2 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold mb-6">关于本示例</h2>
                        <p class="text-gray-600 mb-4">
                            这个示例网站专为码云 Pages 设计，可以直接部署使用。它包含了现代网站的基本元素：
                        </p>
                        <ul class="space-y-2 mb-6">
                            <li class="flex items-start">
                                <i class="fa fa-check-circle text-primary mt-1 mr-2"></i>
                                <span>完整的 HTML5 文档结构</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-check-circle text-primary mt-1 mr-2"></i>
                                <span>响应式布局，适配各种设备</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-check-circle text-primary mt-1 mr-2"></i>
                                <span>基本的交互功能和动画效果</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fa fa-check-circle text-primary mt-1 mr-2"></i>
                                <span>优化的代码结构，便于维护和扩展</span>
                            </li>
                        </ul>
                        <a href="https://gitee.com/help/articles/4136" target="_blank" class="inline-block text-primary font-medium hover:underline">
                            查看码云 Pages 官方文档 <i class="fa fa-external-link ml-1"></i>
                        </a>
                    </div>
                </div>
            </div>
        </section>

        <!-- 联系区域 -->
        <section id="contact" class="py-16 bg-white">
            <div class="container mx-auto px-4 max-w-3xl">
                <h2 class="text-[clamp(1.5rem,3vw,2.5rem)] font-bold text-center mb-12">联系我们</h2>
                
                <form id="contactForm" class="space-y-6">
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                        <div>
                            <label for="name" class="block text-gray-700 mb-2">姓名</label>
                            <input type="text" id="name" name="name" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" required>
                        </div>
                        
                        <div>
                            <label for="email" class="block text-gray-700 mb-2">邮箱</label>
                            <input type="email" id="email" name="email" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" required>
                        </div>
                    </div>
                    
                    <div>
                        <label for="subject" class="block text-gray-700 mb-2">主题</label>
                        <input type="text" id="subject" name="subject" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" required>
                    </div>
                    
                    <div>
                        <label for="message" class="block text-gray-700 mb-2">留言</label>
                        <textarea id="message" name="message" rows="5" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" required></textarea>
                    </div>
                    
                    <button type="submit" class="w-full bg-primary text-white font-semibold py-3 px-6 rounded-lg hover:bg-primary/90 transition-custom">
                        发送留言 <i class="fa fa-paper-plane ml-2"></i>
                    </button>
                </form>
                
                <!-- 表单提交成功消息 -->
                <div id="successMessage" class="hidden mt-6 p-4 bg-green-100 text-green-700 rounded-lg">
                    <i class="fa fa-check-circle mr-2"></i> 留言发送成功！我们会尽快回复您。
                </div>
            </div>
        </section>
    </main>

    <!-- 页脚 -->
    <footer class="bg-gray-800 text-white py-10">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-6 md:mb-0">
                    <div class="flex items-center space-x-2 mb-2">
                        <i class="fa fa-code text-primary text-xl"></i>
                        <span class="font-bold text-lg">Gitee Pages 示例</span>
                    </div>
                    <p class="text-gray-400 text-sm">一个简单的静态网站示例，适合部署到码云 Pages</p>
                </div>
                
                <div class="flex space-x-4">
                    <a href="#" class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center hover:bg-primary transition-custom">
                        <i class="fa fa-github"></i>
                    </a>
                    <a href="#" class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center hover:bg-primary transition-custom">
                        <i class="fa fa-gitee"></i>
                    </a>
                    <a href="#" class="w-10 h-10 rounded-full bg-gray-700 flex items-center justify-center hover:bg-primary transition-custom">
                        <i class="fa fa-twitter"></i>
                    </a>
                </div>
            </div>
            
            <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400 text-sm">
                &copy; 2023 Gitee Pages 示例网站. 保留所有权利.
            </div>
        </div>
    </footer>

    <!-- JavaScript 功能 -->
    <script>
        // 移动端菜单切换
        const menuBtn = document.getElementById('menuBtn');
        const mobileMenu = document.getElementById('mobileMenu');
        
        menuBtn.addEventListener('click', () => {
            mobileMenu.classList.toggle('hidden');
            // 切换图标
            const icon = menuBtn.querySelector('i');
            if (icon.classList.contains('fa-bars')) {
                icon.classList.replace('fa-bars', 'fa-times');
            } else {
                icon.classList.replace('fa-times', 'fa-bars');
            }
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                
                // 关闭移动菜单（如果打开）
                if (!mobileMenu.classList.contains('hidden')) {
                    mobileMenu.classList.add('hidden');
                    const icon = menuBtn.querySelector('i');
                    icon.classList.replace('fa-times', 'fa-bars');
                }
                
                const targetId = this.getAttribute('href');
                const targetElement = document.querySelector(targetId);
                
                if (targetElement) {
                    window.scrollTo({
                        top: targetElement.offsetTop - 80, // 考虑导航栏高度
                        behavior: 'smooth'
                    });
                }
            });
        });
        
        // 导航栏滚动效果
        window.addEventListener('scroll', () => {
            const header = document.querySelector('header');
            if (window.scrollY > 50) {
                header.classList.add('py-2');
                header.classList.remove('py-4');
                header.classList.add('shadow');
            } else {
                header.classList.add('py-4');
                header.classList.remove('py-2');
                header.classList.remove('shadow');
            }
        });
        
        // 表单提交处理
        const contactForm = document.getElementById('contactForm');
        const successMessage = document.getElementById('successMessage');
        
        contactForm.addEventListener('submit', (e) => {
            e.preventDefault();
            
            // 模拟表单提交
            setTimeout(() => {
                contactForm.reset();
                successMessage.classList.remove('hidden');
                
                // 3秒后隐藏成功消息
                setTimeout(() => {
                    successMessage.classList.add('hidden');
                }, 3000);
            }, 1000);
        });
    </script>
</body>
</html>
